import request from '@/config/axios'
// 获得表单定义
export const getFormApi = async (id: number) => {
  return await request.get({
    url: '/cms/model/get?id=' + id
  })
}

//获取上传相关配置
//TODOzrcms 待补充服务端上传配置
export const getUploadConfig = async () => {
  return await request.get({ url: '/cms/setting/getUpladConfig' })
}

//裁剪图片
export const cutImage = async (data: Record<string, any>) => {
  return await request.post({
    url: '/infra/file/image-crop',
    data
  })
}
//裁剪头像
export const cutAvatar = async (data: Record<string, any>) => {
  return await request.post({
    url: '/infra/file/avatar-crop',
    data
  })
}
